﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SetForCurrentUser.aspx.cs" Inherits="PPAP.Web.Substitutes.SetForCurrentUser" %>

<%@ Register assembly="PPAP.WebControls" namespace="PPAP.WebControls" tagprefix="cc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head >
    <title></title>
    <script src="../Common/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script language="javascript">
        function Del(id) {
            url = "SetForCurrentUser.aspx?SID=" + id;
            if (confirm('Delete?')) {
                //alert(url);
                window.location.href = url;
            }
        }
		</script>
</head>
<body  style="font-family: Arial, Helvetica, sans-serif;" >
    <form id="form1" runat="server">
    <div>
    <table width="100%">
    <tr><td colspan="2" style="font-weight:bold; color:#2E8AC5; font-size:larger;" bgcolor="#E7E8E8">Substitutes setup</td></tr>
    <tr><td bgcolor="#E7E8E8" style="width:30%;">Substitutes:</td><td bgcolor="#E7E8E8">
        <asp:DropDownList ID="ddlSubstitutes" runat="server">
        </asp:DropDownList>
        </td></tr>
    <tr><td bgcolor="#E7E8E8" style=" height:90px"></td><td bgcolor="#E7E8E8">
        <asp:CheckBox ID="cbEnable" runat="server" AutoPostBack="True" 
            oncheckedchanged="cbEnable_CheckedChanged" Text="Enable" />
        
        <asp:TextBox ID="txtSubstitutesDate" Visible="false" onclick="WdatePicker();" 
            runat="server"></asp:TextBox>
        <br /><br />
        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="Save" 
            onclick="btnSave_Click" 
            onclientclick="return confirm('Are you sure you want to save?');" />
        </td></tr>
        <tr><td colspan="2">
         <asp:DataGrid ID="dgList" HeaderStyle-BackColor="#2E8AC5" HeaderStyle-Font-Bold="true"
            HeaderStyle-Height="32px" Width="100%" OnLoad="dgLoad" AutoGenerateColumns="False"
            runat="server">
            <Columns>
                <asp:BoundColumn DataField="rownum" HeaderText="No.">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:TemplateColumn  HeaderText="UserName" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                 <asp:Label ID="Label2" runat="server" Text='<%# Eval("USERNAME") %>'></asp:Label>
                </ItemTemplate>
                </asp:TemplateColumn>
           <asp:TemplateColumn HeaderText="SubstitutesUser" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%#Eval("SUBSTITUTESUSER") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="SubstitutesEnable" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%#Eval("SUBSTITUTESENABLE").ToString()=="1"?"Yes":"No" %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="SubstitutesDate" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Label ID="Label5" runat="server" Text='<%# Eval("ti") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:TemplateColumn>
        <asp:HyperLinkColumn Text="Delete" DataNavigateUrlField="ID" Visible="false" DataNavigateUrlFormatString="javascript:Del('{0}');"
									HeaderText="Delete">
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
								</asp:HyperLinkColumn>
         <asp:TemplateColumn HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
         <ItemTemplate>
         <img src="../Images/newimg/delete.png" title="Delete" onclick="<%#"javascript:Del("+Eval("ID")+");" %>" />
         </ItemTemplate>
         </asp:TemplateColumn>
            </Columns>
            <HeaderStyle BackColor="#E7E8E8" Font-Bold="True" Height="32px"></HeaderStyle>
        </asp:DataGrid>
        </td></tr>
    </table>
    </div>
    </form>
</body>
</html>
